home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Professor Fernleaf from the Tropics
/
Professor Fernleaf from the Tropics.iso
/
pc
/
program
/
xtras
/
popup.x32
/
TEXT
/
TEXT_CASTSCRIPT
next >
Wrap
Text File
|
1998-08-11
|
3KB
|
76 lines
---------------------------------------------------
-------------- on menuItemSelected ----------------
---------------------------------------------------
-- The Popup Xtra castmember will send the "menuItemSelected" event to Director
-- whenever a valid menu selection has been made.
--
-- The menuItemSelected event is sent when one of the following occurs:
-- (1) The user clicks the mouse on the Popup Xtra sprite, selects an item and
-- then releases the mouse button (and the trapEvents property has been set to TRUE
-- either through scripting or the Castmember Properties dialog), or
-- (2) The Activate() command has been explicitly called and the user selects an item and
-- then releases the mouse button.
--
-- NOTE: If you are using the activateMenu command, *always* set the trapsEvents property
-- to FALSE, which can be done in the Castmember Properties dialog or through scripting.
-- This will allow your scripting to control the appearance of the menu and not Director.
-- Arguments:
-- me: the Popup Xtra sprite that was used to make the selection
-- menuSpec: the selected item's menu specification (the selectedSpec property)
-- menuText: the selected item's text (the selectedText property)
-- memberRef: the Popup Xtra castmember that was used to make the selection
on menuItemSelected me, menuSpec, menuText, memberRef
-- your Lingo code goes here
end
-- TIPS:
-- The menuItemSelected event sent first to the sprite. If no sprite script or behavior
-- is attached which processes this event, then the event is sent to this castmember script.
-- The order of calling this handler is as follows:
-- Sprite script-->Cast script-->Frame script-->Movie Script
-- So, if you want to have the same Popup Xtra castmember used for numerous sprites, you
-- need to add this event handler to the sprite script (the castmember handler will never get
-- called if there is a sprite script event handler for the menuItemSelected event.)
-- If you want to have a movie handler control *all* of the Popup Xtra interactions, you can
-- comment out the menuItemSelected handler from all of the castmember scripts and add one to
-- the movie script instead. You can then examine the memberRef argument to determine which
-- menu was selected.
---------------------------------------------------
-------------- on mouseDown -----------------------
---------------------------------------------------
-- This will be invoked *before* the menu is activated.
-- If you want to trigger the popup menu upon certain conditions, such as only if the
-- control key is held down, you would call the activateMenu command to do this.
-- NOTE: If you are calling the activateMenu command, *always* set the trapsEvents property
-- to FALSE, which can be done in the Castmember Properties dialog or through scripting.
--
-- TIP: If you are converting scripts used with previous versions of Popup Xtra,
-- you should convert the mouseDown handlers to menuItemSelected handlers to
-- get the best experience across all platforms and operating system versions.
on mouseDown
end mouseDown
---------------------------------------------------
-------------- on mouseUp -------------------------
---------------------------------------------------
-- This will be invoked *after* the menu has been selected from or activated.
on mouseUp
end mouseUp